package com.inno.launcher.manager;

import com.inno.launcher.MyApp;
import com.inno.launcher.conf_rebuild.RBConstants;
import com.vv.vv_commonlibrary.utils.SPUtil;


public class AccountManager {

    private volatile static AccountManager INSTANCE;
    private                 String         token;
    private                 String         jsession;

    private AccountManager() {

    }

    public static AccountManager getInstance() {
        if (INSTANCE == null) {
            synchronized (AccountManager.class) {
                if (INSTANCE == null) {
                    INSTANCE = new AccountManager();
                }
            }
        }
        return INSTANCE;
    }

    /**
     * 获取用户Token
     *
     * @return
     */
    public String getToken() {
        token = SPUtil.getString(MyApp.getContext(), RBConstants.ACCESS_TOKEN, "");
        return token;
    }

    public void setToken(String token) {
        SPUtil.putString(MyApp.getContext(), RBConstants.ACCESS_TOKEN, token);
    }

}
